Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Ajax Interview Questions and Answers

Test your skills through the online practice test: Ajax Quiz Online Practice Test

Ques 36. Why does HTML_AJAX hang on some server installs?

If you run into an HTML_AJAX problem only on some servers, chances are your running into a problem with output compression. If the output compression is handled in the PHP config we detect that and do the right thing, but if its done from an apache extension we have no way of knowing its going to compress the body. Some times setting HTML_AJAX::sendContentLength to false fixes the problem, but in other cases you'll need to disabled the extension for the AJAX pages.
I've also seen problems caused by debugging extensions like XDebug, disabling the extension on the server page usually fixes that. Questions dealing with Using HTML_AJAX, and general JavaScript development

Is it helpful? Add Comment View Comments
 

Ques 37. How do I get the XMLHttpRequest object?

Depending upon the browser... if (window.ActiveXObject) { // Internet Explorer http_request = new ActiveXObject("Microsoft.XMLHTTP"); } else if...

Is it helpful? Add Comment View Comments
 

Ques 38. Are there any security issues with AJAX?

JavaScript is in plain view to the user with by selecting view source of the page. JavaScript can not access the local filesystem without the user's permission. An AJAX interaction can only be made with the servers-side component from which the page was loaded. A proxy pattern could be used for AJAX interactions with external services.
You need to be careful not to expose your application model in such as way that your server-side components are at risk if a nefarious user to reverse engineer your application. As with any other web application, consider using HTTPS to secure the connection when confidential information is being exchanged.

Is it helpful? Add Comment View Comments
 

Ques 39. What about applets and plugins ?

Don't be too quick to dump your plugin or applet based portions of your application. While AJAX and DHTML can do drag and drop and other advanced user interfaces there still limitations especially when it comes to browser support. Plugins and applets have been around for a while and have been able to make AJAX like requests for years. Applets provide a great set of UI components and APIs that provide developers literally anything.
Many people disregard applets or plugins because there is a startup time to initialize the plugin and there is no guarantee that the needed version of a plugin of JVM is installed. Plugins and applets may not be as capable of manipulating the page DOM. If you are in a uniform environment or can depend on a specific JVM or plugin version being available (such as in a corporate environment) a plugin or applet solution is great.
One thing to consider is a mix of AJAX and applets or plugins. Flickr uses a combination of AJAX interactions/DHTML for labeling pictures and user interaction and a plugin for manipulating photos and photo sets to provide a great user experience. If you design your server-side components well they can talk to both types of clients.

Is it helpful? Add Comment View Comments
 

Ques 40. Why did you feel the need to give this a name?

I needed something shorter than "Asynchronous JavaScript+CSS+DOM+XMLHttpRequest" to use when discussing this approach with clients.

Is it helpful? Add Comment View Comments
 

Most helpful rated by users:

©2024 WithoutBook